package com.atbeijing.bigdata.spark.mytest.sql

import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession

object Spark_Hive {
  def main(args: Array[String]): Unit = {
    val conf: SparkConf = new SparkConf().setMaster("local[*]").setAppName("hive")
    conf.set("spark.sql.warehouse.dir", "hdfs://hadoop103:8020/user/hive/warehouse")
    val spark: SparkSession = SparkSession
      .builder()
      .enableHiveSupport()
      .master("local[*]")
      .appName("sql")
      .getOrCreate()
    import spark.implicits._

    spark.sql("show databases").show()








  }


}
